package com.yunji.app.base;

import com.yunji.base.business.SiteBusiness;
import com.yunji.common.base.BaseController;
import com.yunji.common.base.response.Response;
import com.yunji.common.base.response.ResponseHelper;
import com.yunji.common.model.domain.SiteDO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Project: yunji-coffee
 * @Package com.yunji.app.user
 * @FileName GateWaySiteController.java
 * @Copyright Copyright © 2024 云集互联. All Rights Reserved
 * @Company com
 * @Version 1.0
 * @Since JDK1.8.0_201
 * @CreateTime 2024-06-10 23:48:07
 * @Description 移动端-网点管理交互
 * @Modification History
 * Author					History Time			Version			Description
 * -------------------------------------------------------------------------------
 * HuaAo0803@163.com	2024-06-10 23:48:07		1.0				1.0
 */
@RestController
@Api(tags = "移动端-网点管理")
@RequestMapping("/gateway/site")
public class GateWaySiteController extends BaseController {
    @Resource
    SiteBusiness business;

    @ApiOperation("员工可绑定网点")
    @GetMapping("/list")
    public Response<List<SiteDO>> search() {
        List<SiteDO> list = business.currentStaffSite();
        return ResponseHelper.successWithPage(list);
    }
}